package com.sixth.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sixth.core.entity.CareOrderItem;
import com.sixth.core.vo.R;
import com.sixth.service.CareOrderItemService;
import com.sixth.vo.CareOrderItemVo;
import com.sixth.vo.CheckResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @program: sixth-hospital-parent
 * @description:
 * @author: 李劲锋
 * @create: 2024-08-21 18:36
 **/
@RestController
@RequestMapping("/check")
@Api(tags = "检查")
public class CareOrderItemController {

    @Autowired
    private CareOrderItemService careOrderItemService;

    @PostMapping("/listByPage")
    @ApiOperation(value = "检查列表")
    public R<IPage<CareOrderItem>> list(@RequestBody CareOrderItemVo careOrderItemVo){
        return careOrderItemService.selectByPage(careOrderItemVo);
    }


    @PostMapping("/selectById/{item_id}")
    @ApiOperation(value = "检查详情")
    public R<CareOrderItem> selectById(@PathVariable String item_id){
        return careOrderItemService.selectById(item_id);
    }

    @PutMapping("/startCheck")
    @ApiOperation(value = "查看检查")
    public R<CareOrderItem> startCheck(@RequestBody CheckResultVo CheckResultVo){
        return careOrderItemService.startCheck(CheckResultVo);
    }

}
